package edu.zut.bailan.student.domain;

import edu.zut.bailan.base.domain.BaseTreeEntity;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import java.util.Set;

public class StudentGroup extends BaseTreeEntity<StudentGroup, Long> {

    /**
     *
     */
    private static final long serialVersionUID = 5862795890259966929L;

    /**
     * code of studentgroup
     */
    @Column
    String code;

    /**
     * name for studentgroup
     */
    @Column
    String name;

    /**
     * postcode of studentgroup
     */
    @Column
    String postcode;

    /**
     * phone for studentgroup
     */
    @Column
    Long phone;

    /**
     * address for Customergroup
     */
    @Column
    String address;

    /**
     * edu.zut.bailan.cart for Customergroup
     */
    //@OneToMany(mappedBy = "studentGroup", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    Set<Student> students;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getPhone() {
        return phone;
    }

    public void setPhone(Long phone) {
        this.phone = phone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPostcode() {
        return postcode;
    }

    public void setPostcode(String postcode) {
        this.postcode = postcode;
    }

    public Set<Student> getStudents() {
        return students;
    }

    public void setStudents(Set<Student> students) {
        this.students = students;
    }
}
